# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-photos
pkgver=44.0
pkgrel=3
epoch=1
pkgdesc="Access, organize, and share your photos on GNOME"
url="https://wiki.gnome.org/Apps/Photos"
arch=(x86_64)
license=(GPL)
depends=(
  babl
  dleyna
  gegl
  geocode-glib-2
  gnome-online-accounts
  gsettings-desktop-schemas
  gtk3
  libdazzle
  libgexiv2
  libhandy
  libportal-gtk3
  librsvg
  tracker3-miners
)
makedepends=(
  docbook-xsl
  git
  meson
  python
  yelp-tools
)
groups=(gnome)
_commit=a0eb37bfb6760aa1414fa41ee1ff007336301b8c  # tags/44.0^0
source=(
  "git+https://gitlab.gnome.org/GNOME/gnome-photos.git#commit=$_commit"
  "git+https://gitlab.gnome.org/GNOME/libgd.git"
)
b2sums=('SKIP'
        'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git submodule set-url subprojects/libgd "$srcdir/libgd"
  git -c protocol.file.allow=always submodule update
}

build() {
  local meson_options=(
    -D manuals=true
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
